package com.college.heyuhua.service.impl;

import com.college.heyuhua.dao.NewMapper;
import com.college.heyuhua.entity.Newsinfo;
import com.college.heyuhua.model.Newstyle;
import com.college.heyuhua.service.INewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 赵东坡 on 2018/12/31.
 * Time:13:49
 * 宇宙无敌赵牛逼，祈求永无bug
 */
@Service
@Component
public class NewServiceImpl implements INewService{


    @Autowired
    private NewMapper newmapper;

    @Override
    public List<Newsinfo> homepagefour() {
        return newmapper.homepagefour();
    }

    @Override
    public Newsinfo getOneMessage(Long nid) {
        return newmapper.getOneMessage(nid);
    }

    @Override
    public List<Newsinfo> getNewsBynewsstyleid(int newsstyleid) {
        return newmapper.getNewsBynewsstyleid(newsstyleid);
    }

    @Override
    public boolean deletestyle(String nsid) {
        return newmapper.deletestyle(nsid);
    }

    @Override
    public List<Newstyle> getstylenews() {
        return newmapper.getstylenews();
    }

    @Override
    public boolean addstyle(String stylename) {
        return newmapper.addstyle(stylename);
    }

    @Override
    public boolean addnewsinfo(String ntitle,String ncontent,String newsstyleid) {
        return newmapper.addnewsinfo(ntitle,ncontent,newsstyleid);
    }
}
